const state = {
  orderRefresh: false,
  productfresh: false,
  pickRefresh: false,
  commonRefresh:false,
  processRefresh: false,
  checkinRefresh: false
}

const getters = {
  getOrderRefresh(state) {
    return state.orderRefresh
  },
	getProductRefresh(state) {
	  return state.productfresh
	},
	getPickRefresh(state) {
	  return state.pickRefresh
	},
  getCommonRefresh(state) {
	  return state.commonRefresh
	},
  getProcessRefresh(state) {
	  return state.processRefresh
	},
  getCheckinRefresh(state) {
	  return state.checkinRefresh
	}
}

const mutations = {
  SET_ORDERREFRESH(state, orderRefresh) {
    state.orderRefresh = orderRefresh
  },
  SET_PRODUCTREFRESH(state, productfresh) {
    state.productfresh = productfresh
  },
  SET_PICKREFRESH(state,pickRefresh) {
    state.pickRefresh = pickRefresh
  },
  SET_COMMONREFRESH(state,commonRefresh) {
    state.commonRefresh = commonRefresh
  },
  SET_PROCESSREFRESH(state,processRefresh) {
    state.processRefresh = processRefresh
  },
  SET_CHECKINREFRESH(state,checkinRefresh) {
    state.checkinRefresh = checkinRefresh
  }
}

const actions = {
  setOrderRefresh({
    commit
  }, orderRefresh) {
    commit("SET_ORDERREFRESH", orderRefresh)
  },
  setProductRefresh({
    commit
  }, productRefresh) {
    commit("SET_PRODUCTREFRESH", productRefresh)
  },
  setPickRefresh({
    commit
  }, pickRefresh) {
    commit("SET_PICKREFRESH", pickRefresh)
  },
  setCommonRefresh({
    commit
  }, commonRefresh) {
    commit("SET_COMMONREFRESH", commonRefresh)
  },
  setProcessRefresh({
    commit
  }, processRefresh) {
    commit("SET_PROCESSREFRESH", processRefresh)
  },
  setCheckinRefresh({
    commit
  },checkinRefresh) {
    commit("SET_CHECKINREFRESH", checkinRefresh)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
